Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability for plugins to be fetched from authenticated URLs #2896

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

karthik2804
Copy link
Contributor

This PR enables users to set a SPIN_PLUGIN_AUTH_HEADER environment variable that will then be set on the outgoing request. For example, the header would have a value like token <gh_token> to get a plugin from a private repo.

If this would be better served as a flag like `spin plugins install <secret_plugin> --auth-header "token <gh_token>", I would be happy to update this PR.

Copy link
Collaborator

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd personally prefer this as a CLI option over a header which is way more discoverable.

crates/plugins/src/manager.rs Outdated Show resolved Hide resolved
crates/plugins/src/manager.rs Outdated Show resolved Hide resolved
Copy link
Member

@michelleN michelleN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to Ryan's flag suggestion 👍

@karthik2804
Copy link
Contributor Author

updated the PR to use a cli flag.

src/commands/plugins.rs Outdated Show resolved Hide resolved
src/commands/plugins.rs Show resolved Hide resolved
src/commands/plugins.rs Outdated Show resolved Hide resolved
crates/plugins/src/manager.rs Outdated Show resolved Hide resolved
@itowlson
Copy link
Contributor

The second commit message says "use cli flag along with env var" but I think it actually removes the env var. Would it be worth rewording the commit message not to imply that the env var is still meant to work?

@karthik2804
Copy link
Contributor Author

@itowlson I will address the changes and squash the PR with the commit changes as well.

@karthik2804
Copy link
Contributor Author

I believe the failing CI is unrelated to the changes here.

@itowlson itowlson merged commit c2c1c8b into fermyon:main Oct 29, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants